import axios from "axios";

/**
 * 查询字典
 */
export function getDict(params: any) {
    return axios.get("/sys/dict/get", {
        params: params
    });
}

/**
 * 分页查询字典
 */
export function getPageDict(params: any) {
    return axios.get("/sys/dict/list/page", {
        params: params
    });
}

/**
 * 添加或更新字典
 * @param data
 */
export function saveOrUpdateDict(data: any) {
    return axios.post("/sys/dict/saveOrUpdate/manual", data);
}

/**
 * 根据字典code删除字典
 * @param params
 */
export function deleteDictByCode(params: any) {
    return axios.delete("/sys/dict/delete/code", {
        params: params
    });
}

